import { _decorator, Component} from 'cc';
import { ECSRootSystem } from './ecs/ecs_system';
const { ccclass } = _decorator;

@ccclass('root')
export class root extends Component {

    // persistRootNode: Node = new Node("PersistRootNode");

    private ecsSystems = new ECSRootSystem();

    set ecs(system: ECSRootSystem) {
        this.ecsSystems = system;
    }

    get ecs() {
        return this.ecsSystems;
    }

    onLoad() {
        this.init();
    }

    start() {

    }

    init() {
       // 创建持久根节点
    //    director.addPersistRootNode(this.persistRootNode);
       this.ecsSystems.init();

    }

}

